<%
case page(:current_tab)
  when 'incentives' then incentives_class = 'current'
  when 'landmarks' then landmarks_class = 'current'
  when 'routes' then routes_class = 'current'
  when 'settings' then settings_class = 'current'
  when 'login' then login_class = 'current'
  else
end

%>

<div class="navigation">
  <ul>
    <li><%= link_to 'Home', home_path %></li>
    <%if self.current_user.can('view:incentives', nil) %>
      <li><%= link_to 'Incentives', incentives_path, :class => incentives_class %></li>
    <%end%>
    <% if self.current_user.can('edit:landmark',nil) %>
      <li><%= link_to 'Landmarks', landmarks_path, :class => landmarks_class %></li>
    <% end %>
    <% if self.current_user.can('edit:route',nil) %>
      <li><%= link_to 'Routes', routes_path, :class => routes_class %></li>
    <% end %>
    <%if self.current_user.can('view:user', self.current_user) %>
      <li><%= link_to 'Users', users_path %></li>
    <%end%>    
    <% if logged_in? %>
      <li><%= link_to 'Sign out', logout_path, :class => login_class %></li>
    <% else %>
	<% if @is_student or "#{controller.action_name}".eql?('studentlogin') then %>
      <li><%= link_to 'Sign in', '/studentlogin', :class => login_class %></li>
	<% else %>
      <li><%= link_to 'Sign in', login_path, :class => login_class %></li>
	<% end %>
    <% end %>
  </ul>
</div>
